<template>
	<view class="outer">
		<view class="nav" @click="toIndex">
			<view v-if="isShow" class="home">返回首页</view>
		</view>
	</view>
</template>

<script>
export default {
	props: {
		isShow: {
			type: Boolean,
			default: true
		}
	},
	data() {
		return {};
	},
	methods: {
		toIndex() {
			uni.switchTab({
				url: "/pages/index/index"
			});
		}
	},
	created() {}
};
</script>

<style lang="scss">
.outer {
	margin-top: var(--status-bar-height);
	width: 100vw;
	.nav {
		height: 40px;
		.home {
			height: 40px;
			line-height: 40px;
			font-size: 12px;
			margin: 0 10vw;
		}
	}
}
</style>
